{template header}

<style type="text/css">
td{font-size: 12px;}
</style>

<h4 style="padding-left:10px;;">
    <span>搜索</span>
    <i class="icon-search"></i>
</h4>
<form class="form-horizontal" method="post" action="index.php?c=admin&a=complaintsList">
    <div class="control-group search-group" style="margin:0;">
        <label class="control-label" >帖子ID：</label>
        <div class="controls">
          <input type="text" placeholder="帖子ID" name="news_id" value="{$search['news_id']}">
        </div>
    </div>

    <div class="control-group search-group" style="margin:0;">
        <label class="control-label">投诉原因：</label>
        <div class="controls">
            <select name="reason">
                <option value="">请选择</option>
                <option {if $search['reason'] == 1}selected="selected"{/if} value="1">政治或政策谣言</option>
                <option {if $search['reason'] == 2}selected="selected"{/if} value="2">色情或暴力</option>
                <option {if $search['reason'] == 3}selected="selected"{/if} value="3">诈骗或广告</option>
                <option {if $search['reason'] == 4}selected="selected"{/if} value="4">恶意攻击</option>
                <option {if $search['reason'] == 5}selected="selected"{/if} value="5">其他</option>
            </select>
        </div>
    </div>

    <div class="control-group search-group" style="margin:0;">
        <div class="controls">
            <input type="hidden" value="search" name="s">
            <button class="btn" type="submit">提交</button>
        </div>
    </div>
</form>

<div class="bs-docs-example table-align pt-15" style="clear:both;">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>帖子ID</th>
                <th>投诉原因</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {if !$list}  
                <tr>
                    <td>暂无记录</td>
                    <td></td>     
                    <td></td>                
                </tr>
            {else}

            {loop $list $k $v}
            <tr id="{$v['c_id']}">
                <td>
                   <a class="btn btn-link dib" href="?c=admin&a=postInfo&action=edit&postId=$v['news_id']" target="_blank">{$v['news_id']}</a>
                </td>
                <td>{$v['reasonName']}</td>
                <td>
                    <a class="btn btn-edit" href="?c=admin&a=delComplaints&newsid=$v['news_id']" onclick="return confirm('Are you sure?')">删除</a>
                </td>
            </tr>
            {/loop}

            {/if}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
{template footer}
